<template>
    <div>

    </div>
</template>
<script>
let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 44, 55, 8, 8, 12, 158, 21, 1, 56, 126, 156, 12, 1, 1, 21, 586, 1, 21, 854, 2, 123, 56, 1, 2, 5, 1, 1,];
//冒泡排序

for (let i = 0; i < arr.length - 1; i++) {
    for (let j = 0; j < arr.length - 1 - i; j++) {
        if (arr[j] > arr[j + 1]) {
            let temp = arr[j];
            arr[j] = arr[j + 1];
            arr[j + 1] = temp;
        }
    }
}
console.log(arr);
</script>